One of the elements within a computer operating system is memory management. Memory management consists of hardware and software that controls the allocation and use of physical memory. The effect of memory management is exemplified in multiprogramming systems in which several processes reside in memory at the same time. Memory management typically includes a virtual memory system. The virtual memory system provides the CPU (central processing unit) with mapping information. The CPU generates virtual addresses when an image is executed. Before these virtual addresses can be used to access instructions and data, they must be translated into physical addresses. Memory management software maintains tables of mapping information (page tables) that keep track of where each page of virtual addresses is located in physical memory. The CPU uses this mapping information when it translates virtual addresses to physical addresses. The mapping of virtual addresses through page tables in a virtual memory system provides a large virtual address space, and allows programs to run on hardware with smaller physical memory configurations.
The range of virtual addresses is referred to as the virtual address space. The virtual address space is that set of virtual addresses accessible by the current process. A process is current when its process context is loaded into the CPU and the process is actively executing. Only one process may be current on a given CPU at a given time. In existing systems, the virtual address space is divided into a shared address space, sometimes referred to as the system address space, and a per-process address space. The per-process address space is referred to as process private space. The shared address space maps code and data shared by all processes, and that is available to any process that is current. The shared address space may for example contain operating system code and data used by all processes. The process private space maps code and data associated with and available to one specific process only when that specific process is current. When the process context is changed, a new process is made current, and the mapping of process private space is changed to map process private space to process private code and data of that process.
A page table is typically used to map the virtual address space to physical memory, in units of "pages". A page is a multibyte unit of memory having a predetermined size. The specific size of a page varies from system to system. A page table contains page table entries (PTEs), each one of which defines a relationship (referred to as a "mapping") between a single virtual page and a physical page of memory. The physical address of a physical page of memory is referred to as a page frame number (PFN). Thus a given virtual page of memory is "mapped" to a page of physical memory by a specific PTE, and similarly that physical page of memory is "mapped" to the virtual page by that specific PTE. The PTE in that case is referred to as "mapping" the virtual page and the physical page of memory.
In existing computer systems, page table entries within a page table may be located in either process private or shared space. Where page table entries mapping process private space for a given process are located within process private space, the contents of those page table entries can ordinarily only be accessed when that specific process is current. Thus for a process to access the process private page table entries of another process, a context switch is typically required.
Among existing systems, two alternatives are used to allocate the virtual address space into shared and process private space. In the first method, referred to as an "even split", one half of the potential virtual address space is reserved for process private space, and the remaining one half is reserved for shared space. An undesirable aspect of even split allocation is that it frequently reserves far more shared space than is truly needed for operation. Such excess shared space would be more advantageously allocated to processes running on computer system.
In the second virtual address allocation method, referred to as "uneven split", the operating system allocates a smaller portion of the virtual address space for shared space. The amount of shared space allocated from the virtual address space for shared space is an amount sufficient to satisfy the needs of the operating system, leaving the remainder for use by users (processes) of the operating system.
Software written to run in conjunction with a particular operating system may rely on how the virtual address space is split between shared space and process private space. For example, software written to execute under a system using existing even split virtual address allocation may not be able to run on an uneven split system, and vice versa. Thus in existing systems there is a compatibility problem when moving software between even split and uneven split systems.
In addition, as computer technology advances, the size of virtual addresses, and virtual address spaces is growing. For example computer systems are increasingly employing 64-bit addresses as opposed to the earlier 32-bit address technology. As the virtual address space of such newer systems grows, it becomes less practical to use even split systems, since an even split of a very large virtual address space results in allocation of far more shared space than is ordinarily required.
Thus there is needed a new virtual memory system, which provides compatibility to software written for either an even split or uneven split virtual address allocation. The new system should not require even split allocation, in order that larger virtual address spaces be efficiently allocated. And the new system should be easily tunable to reflect the requirements of its operating environment.